import { createPinia } from 'pinia'
import persist from 'pinia-plugin-persistedstate'

import { useUserStore } from './user'
import { useCounterStore } from './counter'

// export { useUserStore, useCounterStore }

// 相当于 把 user.ts中的内容全部导入，再导出
export * from './user'
export * from './counter'
export * from './consult'
export const useStore = () => {
  return {
    userStore: useUserStore(),
    counterStore: useCounterStore()
  }
}
const store = createPinia()
store.use(persist)

export default store
